package edu.lmu.cs.forney.roflkode.entities;

import edu.lmu.cs.forney.util.Log;

/**
 * A declaration statement.  This statement declares a new entity.
 */
public class Declaration extends Statement {
    private Declarable declarable;

    /**
     * Creates a declaration statement.
     */
    public Declaration(Declarable declarable) {
        this.declarable = declarable;
    }

    /**
     * Returns the entity being declared.
     */
    public Declarable getDeclarable() {
        return declarable;
    }

    /**
     * Analyzes this statement.
     */
    public void analyze(Log log, SymbolTable table, Function f, boolean inLoop) {
        declarable.analyze(log, table);
    }
}
